//
//  Tools.swift
//  EyeVisionForPatients
//
//  Created by TT on 2020/2/10.
//  Copyright © 2020 tao Tao. All rights reserved.
//

import UIKit

struct SettingTools {
    static func openAppSetting() {
        guard let url = URL(string: UIApplication.openSettingsURLString),
            UIApplication.shared.canOpenURL(url) else { return }
        UIApplication.shared.open(url, options: [:], completionHandler: nil)
    }
}

struct UserTools {
    static func removeAllUserInfo() {
        SEIMManager.destroy()
        NemoSDK.sharedInstance().logout()
        UserDefaults.removeXylinkAccount()
        UserDefaults.removeAuthToken()
        UserDefaults.removeUserId()
        if UserDefaults.remberAccountAndPsd == false {
            UserDefaults.removeUserAccount()
        }
    }
}

struct NoticeName {
    static var XylinkConnectingNotification: Notification.Name {
        Notification.Name("XylinkConnectingNotice")
    }
}
